//#include "stdafx.h"

#include "pack_impl.h"
#include "file/pack.h"

//#include "utility_new.h"

namespace KCore
{

ipack::ipack(pack_read_enum read,pack_memory_enum memory_enum)
{
	m_pack = new pack(read,memory_enum);
}

ipack::~ipack()
{
	delete m_pack;
	m_pack = 0;
}

bool ipack::open(const char *file_pack,const char *key)
{
	return m_pack->open(file_pack,key);
}

void ipack::get_like_file(const char* file_name, char* des_name)
{
	return m_pack->get_like_file(file_name,des_name);
}

file* ipack::locate(const char *file)
{
	return m_pack->locate(file);
}

void ipack::trace_io(std::stringstream& os) const
{
	return m_pack->trace_io(os);
}

void ipack::trace_memory(std::stringstream& os) const
{
	return m_pack->trace_memory(os);
}

void ipack::trace(std::stringstream& os) const
{
	return m_pack->trace(os);
}

void ipack::clear_filenotuse(time_t time_less)
{
	return m_pack->clear_filenotuse(time_less);
}

void ipack::clear_all()
{
	return m_pack->clear_all();
}


};
